#ifndef __CHARLCD_H
#define __CHARLCD_H

#include <stm32f10x.h>

// LCD1602控制引脚定义
#define LCM_RS_set    GPIOD->BSRR = GPIO_Pin_0
#define LCM_RS_clr    GPIOD->BRR  = GPIO_Pin_0
#define LCM_RW_set    GPIOD->BSRR = GPIO_Pin_1
#define LCM_RW_clr    GPIOD->BRR  = GPIO_Pin_1
#define LCM_E_set     GPIOD->BSRR = GPIO_Pin_2
#define LCM_E_clr     GPIOD->BRR  = GPIO_Pin_2

// 函数声明
void LCM_Init(void);
void GPIO_LCM_Configuration(void);
void WrCLcdC(u8 lcdcomm);
void WrCLcdD(u8 lcddata);
void WriteString(u8 x, u8 y, u8 *s);
void Wr_CodeData(void);
void CG_Write(void);

#endif